home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
conv
/
undl_1_2.lha
/
hpbatch.rexx
next >
Wrap
OS/2 REXX Batch file
|
1993-02-17
|
2KB
|
58 lines
/* Convert all the filenames we are passed using HamLabPlus. It is up to
* the user to have actually started HamLabPlus, and to have set up all the
* conversion parameters they want. We just feed it files and save the
* files with a .iff appended to their names.
*
* The only marginal bit is maintaining the output cropping parameters.
* Unfortunately HamLabPlus clears them every time a new picture is loaded,
* so we can't leave that entirely to the user.
*/
if (show('P','HAMLAB.1') == 0) then do
say 'HPBATCH'
say ''
say 'Please start HamLabPlus before running this batch file. Remember to set up'
say 'the conversion parameters you want as well.'
exit 1
end
if (show(L,'rexxsupport.library') == 0) then do
call addlib('rexxsupport.library',0,-30,0)
end
address 'HAMLAB.1'
parse arg rest
do while (1)
parse var rest name rest
name = strip(name,'B')
if (name == '') then leave
'getattr output stem out.'
'open filename 'name' force'
if (rc ~== 0) then do
say 'hpbatch: failed to open 'name
iterate
end
'getattr input stem in.'
say name' width = 'in.width', height = 'in.height
if (out.crop.width ~== 0) then do
'outputcrop width 'out.crop.width' height 'out.crop.height' ul 'out.crop.ulx','out.crop.uly
end
nname = name
ext = right(nname,4)
ext = upper(ext)
if (ext == '.GIF') then do
len = length(nname) - 4
nname = left(nname,len)
end
nname = nname || '.iff'
'saveas name 'nname' overwrite'
end
exit 0